﻿@model SAIM.Models.IndexApplicationViewModel
@{
    ViewBag.Title = "Mis solicitudes";
}

<h2>@ViewBag.Title</h2>

<div class="table-responsive">
    <table id="user-table" class="table table-striped">
        <thead>
            <tr>
                <th>Detalles</th>
                <th>Inmueble</th>
                <th>Fecha</th>
            </tr>
        </thead>


        @if (Model.userApplications.Count() > 0)
        {
            <tbody>
                @foreach (SAIM.Models.userApplicationModel application in Model.userApplications)
                {
                    <tr class="@application.expiredClass">
                        <td>
                            <a href="@application.urlFile" role="button" class="btn btn-primary">
                                <span class="glyphicon glyphicon-file" aria-hidden="true"></span>
                            </a>
                            <a href="@application.urlSummary" role="button" class="btn btn-primary">
                                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                            </a>
                        </td>
                        <td scope="row">@application.immovable</td>
                        <td>@application.reservationDate</td>
                    </tr>
                }
            </tbody>
        }
        else
        {
            <tfoot>
                <tr>
                    <td colspan="3" class="danger">Ningún elemento encontrado</td>
                </tr>
            </tfoot>
        }
    </table>
</div>